package cn.signalpha.modules.shop.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OrderTypeEnum {

	/**
	 * 普通订单
	 */
	ONE("普通订单", 1),
	;

	private final String name;
	private final int category;

    public static OrderTypeEnum instance(int type) {
        OrderTypeEnum[] enums = values();
        for (OrderTypeEnum orderTypeEnum : enums) {
            if (orderTypeEnum.getCategory() == type) {
                return orderTypeEnum;
            }
        }
        return null;
    }
}
